package com.linser.gistools.utils;
/**
 * @author: linser
 * @Desc:颜色操作类
 * @create: 2024-01-21 20:40
 **/
public class ColorOperation {
    /**
     * awtColor转换为fxColor
     * @param awtColor
     * @return
     */
    public static javafx.scene.paint.Color fxColorFromAwtColor(java.awt.Color awtColor) {
        double r = awtColor.getRed() / 255.0;
        double g = awtColor.getGreen() / 255.0;
        double b = awtColor.getBlue() / 255.0;
        double a = awtColor.getAlpha() / 255.0;

        return new javafx.scene.paint.Color(r, g, b, a);
    }
}
